#ifndef GST_ShapeOutputConfig_hpp__
#define GST_ShapeOutputConfig_hpp__

#include <boost/optional.hpp>

#include <string>

#include "exceptions/GSTRuntimeException.h"

#include "buildspec.h"

namespace GST
{
namespace exceptions
{
/**
* Thrown when an error in the intersection config json exists.
* This could be due to wrong syntax or missing arguments
*/
class ShapeOutputConfigError : public GSTRuntimeException
{
public:
	ShapeOutputConfigError(const std::string &throwLocation,
						   const std::string &msg)
			: GSTRuntimeException(throwLocation, msg)
	{
	}
};
} // namespace exceptions
namespace ShapeOutputConfig
{
struct BavariaConfig
{
	boost::optional<std::string> profileLineFileName;
	boost::optional<std::string> bendPointFileName;
	boost::optional<std::string> verticalLinesFileName;
	boost::optional<std::string> horizontalLineFileName;
};
struct Config
{
	boost::optional<double> verticalExaggeration;
	boost::optional<bool> worldCoordinates;
	boost::optional<std::string> title;
	boost::optional<std::string> titleColumnName;
	boost::optional<std::string> exaggerationColumnName;
	boost::optional<std::string> origNameColumnName;
	boost::optional<std::string> aliasNameColumnName;
	boost::optional<std::string> dateColumnName;
	boost::optional<std::string> modelColumnName;
	boost::optional<std::string> pointsFileName;
	boost::optional<std::string> linesFileName;
	boost::optional<std::string> polygonsFileName;
	boost::optional<BavariaConfig> bavariaConfig;
};

GST_API_EXPORT void fromJson(Config &config, const std::string &json);
GST_API_EXPORT void toJson(std::string &json, const Config &config);
} // namespace ShapeOutputConfig
} // namespace GST

#endif // GST_ShapeOutputConfig_hpp__
